<div class="main-div">
    <div>
        <li class="changep-li"><a>基本信息</a></li>
    </div>
    <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm($event,validateForm.value)">
        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="7">
                <label nz-form-item-required>旧密码</label>
            </div>
            <div nz-col [nzSpan]="12" nz-form-control nzHasFeedback>
                <nz-input formControlName="oldPassword" [nzPlaceHolder]="'请输入旧密码'" [nzType]="'password'" [nzSize]="'large'"></nz-input>
                <div nz-form-explain *ngIf="getFormControl('oldPassword').dirty&&getFormControl('oldPassword').hasError('required')">请输入旧密码!</div>
                <!--<div nz-form-explain *ngIf="getFormControl('oldPassword').dirty&&getFormControl('oldPassword').hasError('valp')">密码长度不能小于6!</div>-->
            </div>
        </div>
        <div nz-form-item nz-row>
            <div nz-col [nzSpan]="7" nz-form-label>
                <label nz-form-item-required>新密码</label>
            </div>
            <div>
                <div nz-col [nzSpan]="12" nz-form-control nzHasFeedback>
                    <nz-input formControlName="newPassword" [nzPlaceHolder]="'请输入新密码'" [nzType]="'password'" [nzSize]="'large'"></nz-input>
                    <div nz-form-explain *ngIf="getFormControl('newPassword').dirty&&getFormControl('newPassword').hasError('required')">请输入新密码!</div>
                    <div nz-form-explain *ngIf="getFormControl('newPassword').dirty&&getFormControl('newPassword').hasError('confirm')">新密码不能和旧密码一致!</div>
                </div>
            </div>
        </div>
        <div nz-form-item nz-row>
            <div nz-col [nzSpan]="7" nz-form-label>
                <label nz-form-item-required>确认新密码</label>
            </div>
            <div nz-col [nzSpan]="12" nz-form-control nzHasFeedback>
                <nz-input formControlName="confirmP" [nzType]="'password'" [nzPlaceHolder]="'再次输入新密码'" [nzSize]="'large'">
                </nz-input>
                <div nz-form-explain *ngIf="getFormControl('confirmP').dirty&&getFormControl('confirmP').hasError('required')">再次输入密码!</div>
                <div nz-form-explain *ngIf="getFormControl('confirmP').dirty&&getFormControl('confirmP').hasError('confirm')">两次输入的密码不一致!</div>
            </div>
        </div>
        <div nz-form-item nz-row>
            <div nz-col [nzOffset]="7" [nzSpan]="12" nz-form-control>
                <button nz-button [nzType]="'primary'" [nzSize]="'large'" [disabled]="!validateForm.valid">保存</button>
            </div>
        </div>
    </form>
    <div>
        <nz-alert *ngIf="code==200" [nzType]="'success'" [nzMessage]="notice" nzShowIcon nzCloseable (nzOnClose)="afterClose()"></nz-alert>
        <nz-alert *ngIf="code==400" [nzType]="'error'" [nzMessage]="notice" nzShowIcon nzCloseable (nzOnClose)="afterClose()"></nz-alert>
    </div>
</div>
